﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WatiN.Core;

namespace WatiN.Sharepoint.WebControls
{
    public class QuickLaunchNavigation : Control<Div>
    {
        public override Core.Constraints.Constraint ElementConstraint
        {
            get
            {
                return Find.ByClass("ms-quicklaunch-navmgr");
            }
        }

        private Navigation _navigation = null;

        public Navigation Navigation
        {
            get
            {
                if (_navigation == null)
                {
                    _navigation = this.Element.Controls<Navigation>()[0];
                }
                return _navigation;
            }
        }

        public List<Navigation.MenuItem> MenuItems
        {
            get
            {
                return Navigation.MenuItems;
            }
        }
    }
}
